package group2assignone.ucm.customer;

import group2assignone.ucm.UCController;
import group2assignone.view.OurView;
import group2assignone.view.customer.CreateAccountView;
/**
 * Use Case: Change UI to Create Account view 
 * Pre-condition: User clicks the 'create account' button from the main menu
 * Post-condition: Create account view is displayed.
 * 1. system creates the new Create account view
 * 2. system opens the new Create account view
 * 3. system exits the current view
 * @author group2
 */
public class UCChangeUICreateAccount implements UCController {

    private OurView view;

    /**
     * assigns the view
     * @param view
     */
    public UCChangeUICreateAccount(OurView view) {
        this.view = view;
    }

/**
 * use case to show the 'create customer' view
 */
    public void run() {
        //1. system creates the new Create account view
        CreateAccountView gui = new CreateAccountView();
        gui.go();       //2. system opens the new Create account view
        view.dispose(); //3. system exits the current view
    }
}
